<?php 
	  $user=$session->read('User');
	  $colleageid=$session->read("colleageid");
?>
<div class="right_side_operate_area">
	<div class="right_side_title left">
    	<h2>
			<?php 
				$colleagename=$session->read("colleagename");
				echo $html->link($colleagename,"/colleages/showcolleageinfo/".$colleageid);
			?>
    	</h2>
    	<div class='clear'></div>
    </div>

	<div class="right item_add_btn">
    <?php 
		echo $html->link("返回","/colleages/demand/");?>    
    </div>
    <div class="clear"></div>
</div>
<div class="right_side_scollbar">
    <div class="detail_info_panel">
    	<?php echo $form -> create('demands', array('url' => '/colleages/editdemand/','enctype'=>'multipart/form-data','type'=> 'post','onsubmit'=>'return checksave()') );?>	
    		<div class="details_item_line">  
			        <div class="details_item">
			               <div class="form_left_title left">标题：</div>
			               <div class="form_right_input left"><?php echo $form->value('CgDemand.title') ;?></div>
		            </div>
		    </div>		    
		    <div class="details_item_line">  
			        <div class="details_item">
			               <div class="form_left_title left">发布人：</div>
			               <div class="form_right_input left"><?php echo $form->value('CgDemand.publisher') ;?></div>
		            </div>
		    </div>		    
		    <div class="details_item_line">  
			        <div class="details_item">
			               <div class="form_left_title left">有效期：</div>
			               <div class="form_right_input left"><?php echo $form->value('CgDemand.validity') ;?>&nbsp天</div>
		            </div>
		    </div>		    
		    <div class="details_item_line">  
			        <div class="details_item">
			               <div class="form_left_title left">需求类型：</div>
			               <div class="form_right_input left">
			               <?php $require_type= $form->value('CgDemand.require_type');
                	       foreach($type as $key=>$rtype){
                		   if($key==$require_type){
                		   echo $rtype;break;
                		}
                	}
                ?>		               		
			               </div>
		            </div>
		    </div>	
		    
		  <div class="details_item_line">  
	         <div class="details_item">
                <div class="form_left_title left"><?php echo "提醒到企业" ;?>：</div>
                <div class="form_right_input left">
	                <?php 
	                $is_alert=$form->value('CgDemand.is_alert');
	                echo $str->getflag($is_alert);
	                ?>
            	</div>
	         </div> 
         </div>
		    
		  <?php if($is_alert){?>	 
		    <div class="details_item_line">
            <div class="details_item">
            	 <div class="form_left_title left">所属产业：</div>
            	 <div class="form_right_add left">
                	<?php 
		            $industryidlist="";
		            if($industrys_cvalues){
			            foreach($industrys_cvalues as $industrys_cvalue){
			            	if(!empty($industrys_cvalue["cvid"])){
			            		$industryidlist.=$industrys_cvalue["cvid"].',';
			            	}
			            }
		            }
		            ?>
		            <div id="pcvalueidlist" class="txthide"><?php echo $industryidlist?></div>
                	<div id="taglist" class="added_item_list left"></div>
                    <div class="add_item_btn left">
		                <div id="add_float_box" class="add_float_box" style="display:none;">
		                    <ul>
			                    <?php 
			                    $dan="'";
			                    foreach($industrys as $key=>$industry){
									echo "<li><label>";
									echo '<input type="checkbox" id="chbox'.$key.'" onclick="settxt(this,'.$dan.$industry.$dan.','.$dan."#ProjectIndustryname".$dan.','.$dan."#ProjectIndustryid".$dan.','.$dan."#taglist".$dan.')" value="'.$key.'" />'.$industry;
									echo "</label></li>";
									echo "<span id='span".$key."' class='txthide'>".$industry."</span>";
								}?> 
							</ul>
		                </div>
					</div>
                    <?php echo $form->text('Project.industryname',array('class'=>'txthide','readonly'=>'true','style'=>'width:500px'));?>
		            <?php echo $form->text('Project.industryid',array('class'=>'txthide'));?>
                </div>
            </div>
        </div>
        <?php }?>
		    	    
		    <div class="details_item_line">  
			        <div class="details_item">
			               <div class="form_left_title left">需求描述：</div>
			               <div class="form_right_input left"><?php echo $form->value('CgDemand.need');?></div>
		            </div>
		    </div>    		
      </div>
</div>

<?php echo $this->element('delfileconfirm',array("title"=>"删除提示","message"=>"你确定要删除吗？")) ?>
<?php echo $javascript->link('project.js');?>